package org.example.springboot;

import org.springframework.beans.factory.annotation.Value;

public class AppConfig {

    @Value("${server.port}")
    private String serverPort;

    private String appName;

    public String getServerPort() {
        return serverPort;
    }

    public AppConfig(String serverPort, String appName) {
        this.serverPort = serverPort;
        this.appName = appName;
    }

    public void setServerPort(String serverPort) {
        this.serverPort = serverPort;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Override
    public String toString() {
        return "AppConfig{" +
                "serverPort='" + serverPort + '\'' +
                ", appName='" + appName + '\'' +
                '}';
    }
}
